package com.leyou.search.service;


import com.leyou.common.dto.SearchParamDTO;
import com.leyou.search.entity.Goods;
import com.leyou.starter.elastic.dto.PageInfo;
import reactor.core.publisher.Mono;

import java.util.List;
import java.util.Map;

/**
 *
 */
public interface SearchService {

    /**
     * 创建索引库和mapping映射关系
     */
    void createIndexAndMapping();

    /**
     * 加载数据
     */
    void lodaData();


    Mono<List<String>> getSuggestion(String key);

    Mono<PageInfo<Goods>> searchGoods(SearchParamDTO paramDTO);

    Mono<Map<String, List<?>>> searchFilter(SearchParamDTO paramDTO);

    void deleteSpuById(Long spuId);

    void saveSpuById(Long spuId);
}
